package cn.ai.shoes.client.controller;


import cn.ai.shoes.common.constant.ShoeConstants;
import cn.ai.shoes.common.pojo.entity.CommonResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

@RestController
@RequestMapping("/lore")
@Tag(name = "模型模块", description = "模型模块")
public class LoreController {
    //定义ist集合
    // 使用静态Map来存储鞋类名称，键和值相同
    //查询所有的lore
    @GetMapping("/list")
    @Operation(summary = "查询所有的模型", description = "查询所有的模型")
    public CommonResult<?> getAllLore() {
        HashMap<String, String> shoeMapHashMap = new HashMap<>();
        for (String key : ShoeConstants.SHOE_MAP.keySet()) {
            shoeMapHashMap.put(key, ShoeConstants.SHOE_MAP.get(key).getImage());
        }
        return CommonResult.success(shoeMapHashMap.entrySet());
    }
}
